package binarySearchTree;

import student.TestCase;
import student.testingsupport.annotations.Hint;

/**
 * Tests class for Contact.
 * @author xinruili
 * @version 1.0
 */
public class ContactTest extends TestCase {
    private Contact contactOne;
    private Contact contactTwo;
    /**
     * sets up any needed variables for test methods.
     * @throws Exception sets up variables
     * @author xinruili
     * @version 1.0
     */
    @Override
    public void setUp() throws Exception {
        contactOne = new Contact("Jack", "Mia", "123");
        contactTwo = new Contact("Mia", "Jack", "456");
    }

    /**
     * Test CompareTo.
     */
    @Hint("CompareTo is error!")
    public void testCompareTo() {
        assertTrue(contactOne.compareTo(contactTwo) < 0);
        assertTrue(contactTwo.compareTo(contactOne) > 0);
        assertEquals(0,
                contactTwo.compareTo(contactTwo));
    }
}
